<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>用户系统</title>
    <script src="/static/js/jquery.js"></script>
    <script src="/static/js/bootstrap.js" ></script>
    <script src="/static/js/bootstrap-table.min.js"></script>
    <link href="/static/css/bootstrap.css" rel="stylesheet">
    <link href="/static/css/bootstrap-table.min.css" rel="stylesheet">
</head>
<body style="font-size:16px">
<div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom shadow-sm">
    <h5 class="my-0 mr-md-auto font-weight-normal">RBAC权限系统</h5>
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item">
                    <a class="nav-link" href="/roles">角色管理 <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/users">用户管理</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link disabled" href="#">权限管理</a>
                </li>
                <li class="nav-item">
                    <a href="/signout" class="btn btn-outline-primary" href="#">退出</a>
                </li>
            </ul>

        </div>
    </nav>
</div>

<div class="container">
    <div class="row">
        <div class="col-12 col-md">
            {% block main %}
            {% endblock %}
        </div>
    </div>

    <footer class="pt-4 my-md-5 pt-md-5 border-top">
        <div class="row">
            <div class="col-12 col-md">
                <h5>Copyright&copy;2020</h5>
                <p>
                    <a target="_blank" href="https://www.liaoxuefeng.com/">Learn</a> -
                    <a target="_blank" href="https://www.liaoxuefeng.com/">Download</a> -
                    <a target="_blank" href="https://github.com/michaelliao">Github</a>
                </p>
            </div>
        </div>
    </footer>
</div>
<script>
    $(document).ready(()=>{
        const href = window.location.href;
        $(".navbar-nav").find(".nav-item").each((index,it)=>{
            console.log('href', $(it).find('a').attr('href'))
            if(href.includes($(it).find('a').attr('href'))){
                $(it).addClass('active')
            }
        })
    })
</script>
</body>
</html>
